<? include '../server_config.php'; ?>
<? 

if($_SESSION['admin']!=true)
{
	?>
	<script>location.href='login.php'</script>
	<?
	return;
}

?>
<br>
news<br>
<br>
<hr>
<br>
<?
	$sql = "SELECT * FROM ud_news ORDER BY news_date DESC;";
	
	
	$result = mysql_query($sql,$connect);

	while($row = mysql_fetch_row($result))
	
	{
		echo $row[1]." - ".$row[3]."<br>".$row[2]."<br><br>";
		
	}

?>

<hr>
<br>
add
<br>
<form action='news_add_proc.php' method='post'>
	<br>
	title : <input type='text' name='title' cols=60>
	<br>
	date(20110505) : <input type='text' name='news_date' cols=60>
	<br>
	<textarea name='content' cols=60 rows=20><? echo $row[0];?></textarea>
	<br>
	<? echo $row[1]; ?>
	<br>
	<input type='submit' value='저장'>
	<br>
</form>

